home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / utility1 / hlpdk40.zip / HELPC.DOC < prev    next >
Text File  |  1993-04-29  |  15KB  |  343 lines

  1.  
  2.  ╔══════════════════════════════════════════════════════════════════════════╗
  3.  ║                                                                          ║
  4.  ║                                 ISoft D&M                                ║
  5.  ║                                 POB. 5517                                ║
  6.  ║                           Coralville IA 52241                            ║
  7.  ║                                   U.S.A                                  ║
  8.  ║                                                                          ║
  9.  ╚══════════════════════════════════════════════════════════════════════════╝ 
  10.  
  11. *******************************************************************************
  12. * HELPC Help Engine Technical specification and compiler user guide           *
  13. * LAST UPDATE - Apr. 28, 1993. (c) 1992,93 - Loewy Ron.                       *
  14. *******************************************************************************
  15.  
  16. *******************************************************************************
  17. *                              General Overview                               *
  18. *******************************************************************************
  19.  
  20.   The Help Engine database is a combination of text that is read by the user,
  21.  and a Topic and Links database that allows the user to view the topics
  22.  he is interested in, using hyper-text methods.
  23.  
  24.  
  25.   Each help database is built of 4 file components : 
  26.  
  27.  1. Help Data File    - this file contains the raw text data.
  28.  2. Topic Index File  - a database table that contains the topic names, and
  29.                         the references to the topics in the Data File.
  30.  3. Links Index File  - a database table that contains the list of links 
  31.                         defined for each topic, and positional data.
  32.  4. Set Data File     - a database configuration file that contains the
  33.                         names of the 3 components defined above, and some 
  34.                         additional information.
  35.  
  36.   Version 1.x is the bare-bones version that includes only the basic
  37.  operations needed from a hyper-text database, this version is implemented
  38.  using the Paradox Engine V3.0 to manage the Topic and Link index tables.
  39.  
  40.   Version 2.x has a new field in the topic table - the title field, help
  41.  databases that were compiled with V1.x will not be executed by version
  42.  2.x, they will have to be re-compiled!.
  43.  
  44.   Version 3.x fields have different length - the databases have to be 
  45.  re-compiled.
  46.  
  47.   The format of the help database is released to the public domain, if
  48.  you implement a database viewer on this database structure, I would be
  49.  happy to receive a copy ..
  50.  
  51. *******************************************************************************
  52. *                               Compiler Usage                                *
  53. *******************************************************************************
  54.  
  55.   The HELPC help compiler is a dos command line program that receives a 
  56.  help definition file (.HDF) and produce a help database. 
  57.  
  58.   The helpC command line is :
  59.  
  60.  HELPC source.fil [/Htopic-table-name] [/Llink-table-name] [/Ddata-file-name] 
  61.                   [/R-] [/ST-] [/CS+] [/EP+]
  62.                   [/W+] [/W30] [/W31] [TH+] [/QH+] [/TV+] [/PH+] [/XD+]
  63.  
  64.   The output of the compiler is a set data file called source.SET, that
  65.  includes the names of the other help database components. 
  66.  
  67.   Please Notice - if the /W+ /W30 or /W31 switch is defined, the compiler 
  68.  will generate a .HPJ and .RTF files that can be used with the Microsoft 
  69.  HC (v3.00b) or HC31 help compiler, and output a .HLP windows help file!. 
  70.  
  71.   By default the help compiler produces a help cross reference report on the 
  72.  topics/links used in the database, if the /R- switch is set, no cross-ref
  73.  report will be generated, and no database integrity indicators will be
  74.  given.
  75.  
  76.  
  77.   IMPORTANT - Scan the output cross reference report for links defined, that
  78.  are not defined as topics!
  79.  
  80.   Notice - An additional switch is available that instructs the help compiler
  81.  to indicate it's parse and code generation progress. Use the /EP+ switch to
  82.  see that the helpC compiler is active. Please understand that the compile
  83.  process can take a long time, on complex help databases. This switch does
  84.  nothing more that ensure to you that the help compiler is alive. 
  85.  
  86.   The /ST switch defines if the topic name defined in the .TOPIC command
  87.  can include embeded spaces. By default this switch is set to /ST- (No
  88.  embedded spaces).
  89.  
  90.   The /CS switch turns Topics and Links case sensativity to ON. Use this
  91.  switch with care - Only if you must have a lower/mixed case index in THELP
  92.  or POPHELP use this switch. Notice that help databases that compile fine
  93.  with case sensativity set to off, might fail to do so in case sensativity
  94.  on. By deafult this switch is set to off (-).
  95.  
  96.   The /XD switch generates code to the MDVXHELP help compiler, available
  97.  free in the file DVXHLP10.ZIP on the internet. When this switch is given,
  98.  a set of cover and section files is generated, as well as a response
  99.  file that should be used to compile the help database.
  100.  
  101. *******************************************************************************
  102. *                           Help Definition Format                            *
  103. *******************************************************************************
  104.  
  105.   The help definition file format is as follows :
  106.  
  107. remarks ...
  108. remarks ...
  109.  
  110. .ENTRY topic-name
  111. [.TITLE optional title for topic]
  112. topic text and link reference .. 
  113. topic text and link reference .. 
  114. topic text and link reference .. 
  115. topic text and link reference .. 
  116. .END-ENTRY 
  117.  
  118. remarks ...
  119.  
  120.  
  121. .ENTRY topic2-name
  122. [.PARAGRAPH]
  123. topic 2 text and link reference .. 
  124. topic 2 text and link reference .. 
  125. topic 2 text and link reference .. 
  126. [.END-PARAGRAPH]
  127. additional topic2 text ...
  128. .END-ENTRY 
  129.  
  130.  
  131.   As can be seen - lines between the .ENTRY and .END-ENTRY keywords are
  132.  the lines processed by the help compiler, to create the help database, 
  133.  every other line is considered a remark, and is not parsed or evaluated by
  134.  the help compiler.
  135.  
  136.   The topic text and link reference lines are simple text lines, with
  137.  special link marks.
  138.  
  139.   A sample will provide the details :
  140.  
  141. This is a text help line that includes one ~link~link-topic-name~ in it.
  142.  
  143.   This line will be displayed in the help engine program as :
  144.  
  145. This is a text help line that includes one link in it.
  146.  
  147.   The word "link" will be in a different color then the rest of the line, 
  148.  to indicate that this is a link. If the user hi-lights the link, and
  149.  presses Enter (or points the mouse cursor and clicks), the help engine will
  150.  look for a topic called "link-topic-name", and display it.
  151.  
  152.   Browse the HELPDEMO.HDF file for a demo of a help database definition file.
  153.  
  154.  Notes :
  155.  
  156.  1. The keywords .TOPIC and .END-TOPIC can be used instead of .ENTRY and
  157.     .END-ENTRY respectivly.
  158.  
  159.     An equivelent pair of keywords are .TOP and .ENDTOP .
  160.  
  161.  2. Keywords are NOT case sensitive. (.topic = .TOPIC = .eNTry)
  162.  
  163.  3. The .TITLE keyword is optional. If no title is defined, the topic name
  164.     is used as a title. (just like in v1.x). 
  165.  
  166.  4. If you want the ~ sign to appear in your help database, use ~~ in your
  167.     help source file. (e.g. "This is a ~~" will be "This is a ~" in the final
  168.     help database.).
  169.  
  170.  5. The Optional .PARAGRAPH and .END-PARAGRAPH commands in the help topic text,
  171.     specify the start and the end of a paragraph. This feature is currently 
  172.     supported only for winhelp sources. This feature is important if you 
  173.     want to create long paragraphs that will wrap correctly when a user resizes
  174.     the help window. It is advized ALWAYS to use this feature for paragraphs,
  175.     future versions of the Help Development Kit will allow greater formatting
  176.     control over paragraphs using this mechanism.
  177.  
  178.     The .PAR and .ENDPAR keywords can be used instead of the .PARAGRAPH and
  179.     .END-PARAGRAPH keywords.
  180.  
  181.  6. When a .PARAGRAPH is issued, a .END-PARAGRAPH MUST be specified at the
  182.     end of the paragraph. These commands must appear as the first words in
  183.     a line. The text after the .PARAGRAPH command is NOT part of the text 
  184.     of the help topic.
  185.  
  186. Additional commands include :
  187.  
  188. .LINKCOLOR and .LINKHIGH - VGA colors of links in normal and high (selected)
  189. states in the native help format.
  190.  
  191. The syntax of these commands is :
  192.  
  193. .LINKCOLOR x
  194.  
  195. or
  196.  
  197. .LINKHIGH y
  198.  
  199. Where x and y are the color of the link, which is a combination of the color
  200. of the foreground with the color of the background multiplied by 16.
  201.  
  202. The colors that can be used for both fore and background are :
  203.  
  204.   Black     = 0
  205.   Blue      = 1
  206.   Green     = 2
  207.   Cyan      = 3
  208.   Red       = 4
  209.   Magenta   = 5
  210.   Brown     = 6
  211.   LightGray = 7
  212.  
  213. The colors that can be used only for the foreground are :
  214.  
  215.   DarkGray     = 8
  216.   LightBlue    = 9
  217.   LightGreen   = 10
  218.   LightCyan    = 11
  219.   LightRed     = 12
  220.   LightMagenta = 13
  221.   Yellow       = 14
  222.   White        = 15
  223.  
  224. For example : to set the normal color of a link to light green on blue, use
  225.  
  226. .LINKCOLOR 26
  227.  
  228. where 26 = 10 + 16 * 1. (10 = light green, 1 = blue).
  229.  
  230. Creating Multiple Source Projects :
  231.  
  232. Use the .INCLUDE commands in the source of your .HDF file, to include an
  233. additional source file.
  234.  
  235. For Example :
  236.  
  237.  .. some stuff 
  238.  
  239. .include 2ndfile.hdf
  240.  
  241.  .. additional stuff
  242.  
  243. will process 2NDFILE.HDF in the middle of our source file.
  244.  
  245. Please notice - .INCLUDE commands can be nested in your source file,
  246. it is however not recommended to nest them too deep, helpC does not
  247. close the input file when a .INCLUDEd file is processed, in order to
  248. minimize help generation time - there is however, a limit on the number
  249. of open files that can be used by a program - this is a limit set by dos.
  250.  
  251. GUI Font based targets :
  252.  
  253. The .FIXEDFONT command is used to define a non proportional font as the 
  254. default font of the help database. Currently the only targets affected
  255. by this command are windows winHelp v3.x. If you find that your help 
  256. databases are not aligned after they are converted to winHelp format, use 
  257. this command and re-compile. This command has no effect on targets that are 
  258. different from the targets mentioned before.
  259.  
  260. The .PCFONT command is used to define a font that has the standard pc 
  261. character set (Terminal - in windows). If you convert a text based 
  262. database that uses the PC's special characters, use this command to
  263. set the default font. This command has no effect on targets that are 
  264. different from the targets mentioned before.
  265.  
  266.  
  267. *******************************************************************************
  268. *                             Topic Index Format                              *
  269. *******************************************************************************
  270.  
  271.   The topic index table format is as follows :
  272.  
  273.   TOPIC     - 40 charcters string key - this is the topic "name".
  274.   FILENAME  - 38 characters string field - includes the name of the
  275.               help raw data file. (Notice - V1.0 ignores the value of this 
  276.               field, it is here for future expansion).
  277.   START     - longint (long) field that contains the offset from the data file
  278.               start, to the start of the topics text data, in bytes.
  279.   LEN       - integer (int) field that contains the length (in bytes) of the 
  280.               text data of the topic.
  281.   TITLE     - 50 characters string key - the title of the topic.
  282.  
  283. *******************************************************************************
  284. *                             Links Index Format                              *
  285. *******************************************************************************
  286.  
  287.   The links index table format is as follows :
  288.  
  289.   TOPIC     - 40 characters string key - the name of the topic that 
  290.               has the link.
  291.   SEQ       - integer (int) key - contains the sequential number of 
  292.               the link in the topic. (This way you can assign the links
  293.               order in the topic).
  294.   LINK      - 40 characters string key - the name of the link topic to
  295.               display if the link is chosen.
  296.   LINE      - integer (int) field - the line (from the start of the topic) 
  297.               this link is displayed on.
  298.   COL       - integer (int) field - the column this link is displayed on.
  299.   TXT       - 60 characters string field - the text to display on the line.
  300.  
  301. *******************************************************************************
  302. *                               Set-File-Format                               *
  303. *******************************************************************************
  304.  
  305.   The set file is a text file that contains one entry in each line, using
  306.  the following format :
  307.  
  308. topic-index-table name
  309. links-index-table name
  310. help-raw-data-file name
  311. number-of-topics
  312. length-of-file
  313. version-of-generating-compiler
  314. link-normal-color
  315. link-high-color
  316.  
  317. *******************************************************************************
  318. *                               Implementation                                *
  319. *******************************************************************************
  320.  
  321.   Notice - The Paradox tables (Topic, Links) include one additional field
  322.  (wtGeneration) for future expansion purpose only.
  323.  
  324. *******************************************************************************
  325. *                                Distribution                                 *
  326. *******************************************************************************
  327.  
  328.   To distribute a database of your creation, compile the help definition
  329.  file, and include the HELPENG.EXE file with the .DB, .PX files, and the
  330.  .HDT file created by the compiler. 
  331.  
  332.   If you generated the Windows (/W30, /W31) help file, you can complile the 
  333.  .HPJ and .RTF generated file, and distribute the resulting .HLP .
  334.  
  335.   If you generate QH, THELP, POPHELP or TVHC use these packages compilers to
  336.  compile you sources into native binary codes. (helpMake, HL, makeHelp and TVHC)
  337.  
  338.   To Generate Help databases for DESQview/X, use the MDVXHELP compiler
  339.  that can be found on the internet in the file DVXHLP10.ZIP.
  340.  
  341.   For examples on these compiler's command lines please refer to the quick
  342.  start section of HLPDK.DOC, or to your compiler's documentation.
  343.